#include "MainControl.h"
#include "SysFunTest.h"
#include "RobotGather.h"
#include <log/NpLogger.h>
#include <log4cxx/helpers/exception.h>
#include <iostream>
#include <mover/Mover.h>
#include "Spider.h"
using namespace npexception;
using namespace std;

//int main(int argc, char* argv[])
int main()
{
  try
  {
    Config::getInstance()->initializeConfigs();
    Connections::getInstance()->init();

//    Mover mover;
//    mover.working();
  Spider spider;
  spider.work();
  }
  catch (int ex)
  {
    cout << "error num is\t" << ex << endl;
  }
  catch (npexception::NpException& ex)
  {
    cout << "error num is\t" << ex << endl;
  }
  catch (const char* ex)
  {
    cout << ex << endl;
  }
  catch (const log4cxx::helpers::Exception& ex)
  {
    cout << ex.what() << endl;
  }
//  catch (...)
//  {
//    cout << "unknown error happened.\n";
//  }
  return 0;
}
